<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>课下查询</title>
</head>
<body>
    <script>
        // 1  concat() 链接两个或多个数组，不影响原数组
        // var arr = [1,2,3];
        // var arr1 = [4,5,6];
        // var arr2 = [];
        // console.log(arr2.concat(arr,arr1));

        // 2  slice(begin,end) 数组截取 返回的是被截取的新数组
        var arr = [1,2,3,4,5,6,7];
        console.log(arr.slice(2,5)); // 3,4,5  遵循的是 后面最后一个不截取

        // 3  splice(第几个开始，要删除个数)  返回的是删除的数组，会影响原数组
        var arr1 = [1,2,3,4,5,6,7];
        console.log(arr1.splice(2,3));

    </script>
</body>
</html>